load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "renderdag",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "extra_buck_dependencies": {"dependencies": ["fbsource//third-party/rust:serde"]},
        "features": {
            "default": [],
            "serialize": ["serde"],
        },
        "lib": {"name": "renderdag"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "description": "Render a DAG into ASCII or Unicode text.",
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-renderdag",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    features = [],
    test_deps = [
        "fbsource//third-party/rust:unicode-width",
        "//eden/scm/lib/drawdag:drawdag",
    ],
    deps = [
        "fbsource//third-party/rust:bitflags",
    ],
)
